<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>渐变图</title>
</head>
<body>
    <div class="demo01"></div>
    <div class="demo02"></div>
    <div class="demo03"></div>
    <div class="demo04"></div>
    <style>
        .demo01 {
            width: 300px;
            height: 300px;
            border: 5px solid #333;
            background-image: linear-gradient(180deg,aqua,green);
        }
         .demo02 {
            width: 300px;
            height: 300px;
            border: 5px solid #333;
            background-image: radial-gradient(circle,yellow,green);
        }
         .demo03 {
            width: 300px;
            height: 300px;
            border: 5px solid #333;
            background-image: radial-gradient(200px 80px,aqua,green);
        }
         .demo04 {
            width: 300px;
            height: 300px;
            border: 5px solid #333;
            background-image: repeating-linear-gradient(to bottom,white,silver 30px);
        }
        div {
            margin-bottom: 20px;
        }
    </style>
</body>
</html>